This invention relates generally to computer systems and more particularly to a method and apparatus for interfacing a data processing mechanism, whether it be software or hardware, to a storage medium having no file allocation table maintained thereon.
A typical computer system comprises a microprocessor, a memory, various peripherals, and a mass storage device. The mass storage device is used to store data files, applications programs, operating system files, and in general, any information that a user wishes to save for subsequent access. In a majority of computer systems, this mass storage device takes the form of a magnetic hard disk drive. In a typical hard disk, the storage area of the disk is separated into a plurality of sectors with each sector having a head, track, and sector designation. Usually, adjacent sectors are grouped into clusters for simplifying access. The size of these clusters may vary from disk to disk. To facilitate access to the clusters, a file allocation table (FAT) is typically stored and maintained on a specific area of the hard disk. The FAT specifies for each cluster whether the cluster is currently being used to store information or whether the cluster may be written to. If the cluster is currently storing information, the FAT specifies to which file the stored information corresponds. Thus, the FAT behaves as a central repository of file storage information for the entire hard disk.
The FAT is consulted each time the hard disk is accessed. For read operations, the FAT is consulted to determine where the desired file may be found, and for write operations, the FAT is used to determine which clusters are available for storing data. Because the FAT is consulted for each disk access, it is important from a practical standpoint that access to the FAT be relatively fast. Otherwise, system performance will seriously suffer. For most magnetic storage media, such as hard and floppy disks, FAT access time is not a problem. Hence, a FAT may be effectively implemented on such media.
Another storage medium which has become popular in recent years is the compact disc read only memory (CD-ROM). CD-ROM""s are desirable because of their large storage capacity. A drawback, however, is that access to information stored on a CD-ROM is relatively slow due to the current limitations of CD-ROM drives. Due in part to this slow access time, and more fundamentally to the fact that a CD-ROM is not a rewritable medium, a FAT is typically not maintained on a CD-ROM. Instead, file storage information is stored close to the files themselves, which means that the file storage information is spread throughout the CD-ROM. A practical consequence of this arrangement is that many application programs, or data processing mechanisms in general, which rely on the presence of a FAT, cannot access a CD-ROM. These FAT reliant data processing mechanisms include data compression programs. Because data compression programs cannot properly access a CD-ROM, it means that CD-ROM""s currently cannot store compressed data files. The ability to store compressed data files is quite desirable because it significantly increases the amount of information a CD-ROM can store. Currently, however, due to the lack of a FAT, CDROM""s do not have this capability.
In accordance with the present invention, a mechanism is provided for interfacing a storage medium having no FAT stored thereon (such as a CD-ROM) with FAT reliant data processing mechanisms (such as data compression programs) so as to allow the FAT reliant mechanisms to properly access the storage medium. Using such an interfacing mechanism, compressed data files may be stored on and read from a CD-ROM. This, in turn, increases the information storage capacity of the CD-ROM.
According to the method of the present invention, interfacing is preferably achieved by first obtaining file storage information from the storage medium. This file storage information preferably specifies for the medium which files are stored thereon and where those files are located. Because the storage medium has no FAT, and hence no central repository of storage information, file storage information is preferably obtained by gathering information from various portions of the medium. Once the file storage information is obtained, it is used to dynamically generate a FAT. This FAT preferably has a format compatible with the data processing mechanisms, and specifies for at least one file on the storage medium the location or locations at which the file is found. The generated FAT is preferably stored in memory so that it may be subsequently accessed. Once generated, information from the FAT is provided to the data processing mechanisms. Using this information, a mechanism may now access information stored on the storage medium.
Information access is preferably achieved by first receiving a request from a data processing mechanism. A determination is made as to whether this request is for additional FAT information or for data from the storage medium. If FAT information is requested, the requested information is provided by referencing the FAT stored in memory. If data is desired, the data request (which is based on FAT information) is translated into one or more physical locations on the storage medium. Information is then read from these locations and relayed to the data processing mechanism. A FAT reliant mechanism is thus able to successfully access information stored on a medium having no FAT maintained thereon.